package com.zenchn.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value="数据字典类型",description="系数据字典类型对象")
public class TSysDictType implements Serializable {

    private static final long serialVersionUID = -9121656168571035991L;
    @ApiModelProperty(value="字典类型ID")
    private String dictTypeId;

    @NotEmpty(message = "字典类型名称不能为空")
    @ApiModelProperty(value="字典类型名称")
    private String dictTypeName;

    @NotNull(message = "是否启用不能为空")
    @ApiModelProperty(value="是否启用")
    private Boolean isEnable;

    @ApiModelProperty(value="是否级联")
    private Boolean isCascade;

    @ApiModelProperty(value="备注")
    private String memo;


    public String getDictTypeId() {
        return dictTypeId;
    }

    public void setDictTypeId(String dictTypeId) {
        this.dictTypeId = dictTypeId == null ? null : dictTypeId.trim();
    }

    public String getDictTypeName() {
        return dictTypeName;
    }

    public void setDictTypeName(String dictTypeName) {
        this.dictTypeName = dictTypeName == null ? null : dictTypeName.trim();
    }

    public Boolean getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(Boolean isEnable) {
        this.isEnable = isEnable;
    }

    public Boolean getIsCascade() {
        return isCascade;
    }

    public void setIsCascade(Boolean isCascade) {
        this.isCascade = isCascade;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo == null ? null : memo.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", dictTypeId=").append(dictTypeId);
        sb.append(", dictTypeName=").append(dictTypeName);
        sb.append(", isEnable=").append(isEnable);
        sb.append(", isCascade=").append(isCascade);
        sb.append(", memo=").append(memo);
        sb.append("]");
        return sb.toString();
    }
}